<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<body th:fragment="header" class="nav-md">
	<div class="top_nav">
		<div class="nav_menu">
			<nav>
				<div class="nav toggle">
					<a id="menu_toggle"><i class="fa fa-bars"></i></a>
				</div>

				<ul class="nav navbar-nav navbar-right">
					<li class=""><a href="javascript:;" class="user-profile dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> <span th:text="${session.USER_IN_SESSION_KEY.name}"></span> <span class=" fa fa-angle-down"></span>
					</a>
						<ul class="dropdown-menu dropdown-usermenu pull-right">
							<li><a href="/logout"><i class="fa fa-sign-out pull-right"></i> Log Out</a></li>
						</ul></li>
				</ul>
			</nav>
		</div>
	</div>

	<script type="text/javascript">
	window.onload=function(){ 
			var host = window.location.host;
	
			if (host.indexOf('bj.admin') > -1) {
				$("#cityAddress").append('北京');
				$("#bj").hide()
			} else if (host.indexOf('tj.admin') > -1) {
				$("#cityAddress").append('天津');
				$("#tj").hide()
			} else if (host.indexOf('hn.admin') > -1) {
				$("#cityAddress").append('海南');
				$("#hn").hide()
			}else if (host.indexOf('cs.admin') > -1) {
				$("#cityAddress").append('长沙');
				$("#cs").hide()
			}else if (host.indexOf('sy.admin') > -1) {
				$("#cityAddress").append('沈阳');
				$("#sy").hide()
			}else if (host.indexOf('sq.admin') > -1) {
				$("#cityAddress").append('商丘');
				$("#sq").hide()
			}
		}
		function exchange(area) {
			$.get("/logout", function() {
				window.location.href = 'http://' + area + '.admin.youpuchina.com/login.html'
			})
		}
	</script>
</body>
</html>
